package com.jeez.module.sys.entity;


import com.jeez.common.entity.DataEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;

/**
 * @author: Felix
 * @date: 2018-7-1
 * @version: v1.0
 * @description:
 */
@Entity
@Table(name = "t_sys_log")
@Getter
@Setter
public class SysLog extends DataEntity<SysLog> {

    /**
     * 操作描述
     */
    @Column(name = "description", length = 100)
    private String description;


    /**
     * 操作用户
     */
    @Column(name = "username", length = 30)
    private String username;


    /**
     * 操作时间
     */
    @Column(name = "start_time", nullable = true, insertable = true, updatable = true)
    private Long startTime;


    /**
     * 消耗时间
     */
    @Column(name = "spend_time", nullable = true, insertable = true, updatable = true)
    private Integer spendTime;


    /**
     * 根路径
     */
    @Column(name = "base_path", length = 100)
    private String basePath;

    @Basic
    @Column(name = "uri", length = 200)
    private String uri;


    @Basic
    @Column(name = "url", length = 200)
    private String url;

    /**
     * 请求类型
     */
    @Column(name = "method", length = 10)
    private String method;


    /**
     * 请求参数
     */
    @Column(name = "parameter", columnDefinition = "TEXT")
    @Lob
    @Basic
    private String parameter;

    /**
     * 用户标识
     */
    @Column(name = "user_agent", length = 200)
    private String userAgent;

    /**
     * IP地址
     */
    @Column(name = "ip", length = 30)
    private String ip;

    /**
     * 响应结果
     */
    @Column(name = "result", columnDefinition = "TEXT")
    @Lob
    @Basic
    private String result;

    /**
     * 权限值
     */
    @Column(name = "permissions", length = 100)
    private String permissions;


}
